import request from '@/utils/request'

// 获取字典列表
export const getList = (query) => {
  return request({
    url: '/eflow/dict/pageQuery',
    method: 'get',
    params: query
  })
}

// 获取字典列表
export const getDictChildren = (query) => {
  return request({
    url: '/eflow/dict/list',
    method: 'get',
    params: query
  })
}

// 创建
export const createDict = (data) => {
  return request({
    url: '/eflow/dict/create',
    method: 'post',
    data
  })
}

// 删除
export const deleteDict = (data) => {
  return request({
    url: '/eflow/dict/delete?id='+data.id,
    method: 'delete',
  })
}

// 更新
export const updateDict = (data) => {
  return request({
    url: '/eflow/dict/update',
    method: 'post',
    data
  })
}
